package com.oracle.service;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: CampusMatching
 * @description:
 * @author: zhaolei
 * @create: 2020-08-04 10:00
 **/
@Service
public class MessageService {

    @Autowired
    RabbitTemplate rabbitTemplate;

    public void send(String exchange,String route,String text){
        rabbitTemplate.convertAndSend(exchange,route,text);

    }

    public  void sendObject(String exchange,String route,Object obj){
        rabbitTemplate.convertAndSend(exchange,route,obj);
    }

}
